//
//  GAKKIBaseTextView.h
//  GANGAIKit
//
//  Created by fh on 2019/11/6.
//  Copyright © 2019 cashchina. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "GAKKIConfig.h"
@class GAKKIBaseTextView;

NS_ASSUME_NONNULL_BEGIN

typedef GAKKIBaseTextView * _Nonnull (^GAKKITextViewFrame) (CGRect frame);
typedef GAKKIBaseTextView * _Nonnull (^GAKKITextViewBackgroundColor) (UIColor * __nullable backgroundColor);
typedef GAKKIBaseTextView * _Nonnull (^GAKKITextViewText) (NSString * __nullable text);
typedef GAKKIBaseTextView * _Nonnull (^GAKKITextViewFont) (UIFont * __nullable font);
typedef GAKKIBaseTextView * _Nonnull (^GAKKITextViewTextColor) (UIColor * __nullable textColor);
typedef GAKKIBaseTextView * _Nonnull (^GAKKITextViewTextAlignment) (NSTextAlignment textAlignment);
typedef GAKKIBaseTextView * _Nonnull (^GAKKITextViewDelegate) (id<UITextViewDelegate> __nullable delegate);

typedef GAKKIBaseTextView * _Nonnull (^GAKKITextViewEditable) (BOOL editable);
typedef GAKKIBaseTextView * _Nonnull (^GAKKITextViewSelectable) (BOOL selectable);

/// 文本框基类
@interface GAKKIBaseTextView : UITextView

/// 初始化统一样式
+ (instancetype)initGAKKIBaseTextView;

/// 工厂类方法
/// @param block 实例对象
+ (GAKKIBaseTextView *)gakki_makeTextView:(void(^)(GAKKIBaseTextView * textView))block;

/// 尺寸
@property (nonatomic, readonly, copy) GAKKITextViewFrame gakki_frame;
/// 背景颜色
@property (nonatomic, readonly, copy) GAKKITextViewBackgroundColor gakki_backgroundColor;
/// 文本
@property (nonatomic, readonly, copy) GAKKITextViewText gakki_text;
/// 字体
@property (nonatomic, readonly, copy) GAKKITextViewFont gakki_font;
/// 字体颜色
@property (nonatomic, readonly, copy) GAKKITextViewTextColor gakki_textColor;
/// 文本对齐方式
@property (nonatomic, readonly, copy) GAKKITextViewTextAlignment gakki_textAlignment;
/// 代理
@property (nonatomic, readonly, copy) GAKKITextViewDelegate gakki_delegate;
///
@property (nonatomic, readonly, copy) GAKKITextViewEditable gakki_editable;
///
@property (nonatomic, readonly, copy) GAKKITextViewSelectable gakki_selectable;

@end

NS_ASSUME_NONNULL_END
